<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>添加房屋租赁信息</title>
    <link th:replace="common/header"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" action="add.do" name="form" th:action="@{/rentingHouse/add}"
                              th:method="post" th:object="${rentingHouse}">
                            <h3 class="header smaller lighter blue"><i class="fa fa-plus" aria-hidden="true"></i>添加房屋租赁信息
                            </h3>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="houseId">房屋信息:<span style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{houseId}" id="houseId" name="houseId" class="input_fix"
                                                    th:value="*{houseId}">
                                                <option value="">--请选择--</option>
                                                <option th:each="info : ${houseInfoList}"
                                                        th:value="${info.id}" th:text="${info.houseName}">山东
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="owner">房屋所有人:<span style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="owner" id="owner" class="input_fix" placeholder="房屋所有人"
                                                   th:value="*{owner}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('houseId')}"
                                                                  th:errors="*{houseId}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('owner')}"
                                                                  th:errors="*{owner}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="price">出租价格(元):<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="price" id="price" class="input_fix" placeholder="卧室数量"
                                                   th:value="*{price}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="priceType">支付类型:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{priceType}" id="priceType" name="priceType"
                                                    class="input_fix" th:value="*{priceType}">
                                                <option value="">--请选择--</option>
                                                <option th:each="type : ${T(xyz.ibenben.zhongdian.system.entity.enums.PayTypeEnum).values()}"
                                                        th:value="${type}" th:text="${type.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('price')}"
                                                                  th:errors="*{price}">Name Error</span></span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('priceType')}"
                                                                  th:errors="*{priceType}">Name Error</span></span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="includeService">租金包含费用:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="includeService" id="includeService" class="input_fix"
                                                   placeholder="租金包含费用" th:value="*{includeService}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="phone">联系电话:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="phone" id="phone" class="input_fix" placeholder="联系电话"
                                                   th:value="*{phone}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('includeService')}"
                                                                  th:errors="*{includeService}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('phone')}"
                                                                  th:errors="*{phone}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="fitment">装修风格:<span style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="fitment" id="fitment" class="input_fix" placeholder="装修风格"
                                                   th:value="*{fitment}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="supply">提供服务:<span style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="supply" id="supply" class="input_fix" placeholder="提供服务"
                                                   th:value="*{supply}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('fitment')}"
                                                                  th:errors="*{fitment}">Name Error</span></span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('supply')}"
                                                                  th:errors="*{supply}">Name Error</span></span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="title">标题:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="title" id="title" class="input_fix" placeholder="标题"
                                                   th:value="*{title}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="description">房源描述:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="description" id="description" class="input_fix"
                                                   placeholder="房源描述" th:value="*{description}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('title')}"
                                                                  th:errors="*{title}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('description')}"
                                                                  th:errors="*{description}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button shiro:hasPermission="/rentingHouse/add" class="btn btn-primary"
                                            type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>提交
                                    </button>
                                    <button shiro:hasPermission="/rentingHouse/add" class="btn btn-danger" type="reset">
                                        <i class="fa fa-times" aria-hidden="true"></i>取消
                                    </button>
                                    <a shiro:hasPermission="/rentingHouse/getAll" class="btn" href="getAll"
                                       th:href="@{/rentingHouse/getAll}"><i class="fa fa-reply" aria-hidden="true"></i>返回</a>
                                </div>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>

<script type="text/javascript">
    $("form").submit(function () {
        $(":submit", this).attr("disabled", "disabled");
    });
</script>
</body>
</html>
